package org.jpass.dc.business.project.bean;

import org.jpass.dc.common.bean.UUIDSupport;

/**
 * 文件实体类，包括普通文件和文件夹
 * @author WeiLong Peng
 *
 */
public class CFile extends UUIDSupport {
	
	private String fileName;
	private String parentPath;
	private String filePath;
	private String fileType;
	private String text;
	
	/* 创建项目的时间   
	private Date createdDate;
	
	private CFile parentFile = new CFile();
	
	 项目所属用户   
	private User user;
	
	@ManyToOne
    @JoinColumn(name="pId")
	public CFile getParentFile() {
		return parentFile;
	}
	public void setParentFile(CFile parentFile) {
		this.parentFile = parentFile;
	}
	
	@ManyToOne
    @JoinColumn(name="userId", nullable=false, updatable=false)
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}*/
	
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	
	public String getParentPath() {
		return parentPath;
	}
	public void setParentPath(String parentPath) {
		this.parentPath = parentPath;
	}
	
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}
	public String getFilePath() {
		return filePath;
	}
	public String getFileType() {
		return fileType;
	}
	public void setFileType(String fileType) {
		this.fileType = fileType;
	}
	
	public String getText() {
		//String str = new FileService().readFile(workPath + "/" + this.parentPath + "/" + this.fileName);
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	
	/*@Column(nullable = false, updatable = false)
	public Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}*/
	
}
